home *** CD-ROM | disk | FTP | other *** search
- {====================================================================
- TShiny component for DELPHI 3.x
- 970823 - Canberra - Australia
-
- http://www.geocities.com/SiliconValley/Bay/2111/
- unclesisko@geocities.com
-
-
- Description
- ------------
- It creates a shiny spot on the left-top corner of any control.
- Attached demo program allows you to test TShiny component.
-
-
-
- E-Mail address:
- ----------------
- unclesisko@geocities.com
-
-
- All the best...
-
-
- "Knowledge has a value when you share it with others..."
- A Turkish proverb
- ====================================================================}
- unit Main;
-
- interface
-
- uses
- Shiney,
- Windows, Classes, Forms, ExtCtrls, StdCtrls, Controls;
-
- type
- TForm1 = class(TForm)
- Button1: TButton;
- Button2: TButton;
- Button3: TButton;
- Button4: TButton;
- Timer1: TTimer;
- ShineyWhite: TShiney;
- ShineyRed: TShiney;
- ShineyYellow: TShiney;
- Timer2: TTimer;
- Timer3: TTimer;
- Label1: TLabel;
- Label2: TLabel;
- Label3: TLabel;
- Label4: TLabel;
- procedure Timer1Timer(Sender: TObject);
- procedure Timer2Timer(Sender: TObject);
- procedure Timer3Timer(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.Timer1Timer(Sender: TObject);
- var i : integer;
- begin
- i := random(ComponentCount-1);
- if (Components[i] is TControl) then begin
- if (Components[i] as TControl).Visible then begin
- ShineyRed.Shine(Components[i] as TControl);
- (Components[i] as TControl).Repaint;
- end;
- end;
- end;
-
-
-
- procedure TForm1.Timer2Timer(Sender: TObject);
- var i : integer;
- begin
- i := random(ComponentCount-1);
- if (Components[i] is TControl) then begin
- if (Components[i] as TControl).Visible then begin
- ShineyYellow.Shine(Components[i] as TControl);
- (Components[i] as TControl).Repaint;
- end;
- end;
- end;
-
- procedure TForm1.Timer3Timer(Sender: TObject);
- var i : integer;
- begin
- i := random(ComponentCount-1);
- if (Components[i] is TControl) then begin
- if (Components[i] as TControl).Visible then begin
- ShineyWhite.Shine(Components[i] as TControl);
- (Components[i] as TControl).Repaint;
- end;
- end;
- end;
-
-
-
-
- end.
-